home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 122_01 / editor < prev    next >
Text File  |  1984-03-05  |  3KB  |  90 lines

  1. EDITOR:
  2. copyright (C) 1983 by E. E. Bergmann
  3. note on line numbers
  4. alphabetical (ASCII) list of defined words
  5. :
  6. ::
  7. *********************************************************
  8. *                            *
  9. * PISTOL-Portably Implemented Stack Oriented Language   *
  10. *            Version 2.0            *
  11. * (C) 1983 by    Ernest E. Bergmann            *
  12. *        Physics, Building #16            *
  13. *        Lehigh Univerisity            *
  14. *        Bethlehem, Pa. 18015            *
  15. *                            *
  16. * Permission is hereby granted for all reproduction and *
  17. * distribution of this material provided this notice is *
  18. * included.                        *
  19. *                            *
  20. *********************************************************
  21. :
  22. ::    (Line numbers change with the editing process,
  23.      the first line in the file is numbered 1,
  24.      the next, 2, etc.)
  25.  
  26. :
  27. ::
  28. DELETE    takes a single line number and deletes that line from
  29.     the edit buffer.
  30.  
  31. DELETES deletes several lines.  How many is specified by the
  32.     top of stack.  The location by the next to top.
  33.  
  34.  
  35. FINISH    is used to end the edit session.  It appends both
  36.     the contents of the editbuffer to the file
  37.     specified in the last OPENW and the remaining
  38.     lines of the file specified by the last OPENR.
  39.  
  40. INPUT    takes the line number on the top of stack and allows
  41.     the user to enter (insert above the old line specified)
  42.     as many new lines as desired.  Completion of input is
  43.     signified by supplying an empty line (an immediate
  44.     carriage return).
  45.  
  46. LI    lists portions of the edit buffer; it acts differently
  47.     depending upon the number of arguments on stack.  If
  48.     there are no arguments, everthing is listed (LISTALL).
  49.     If there is a single line number on the stack, that
  50.     single line is displayed.
  51.         Listing a sequence of lines within the edit
  52.     buffer is achieved with two line numbers on the stack.
  53.     The sequence of displayed lines begins with the line
  54.     numbered by the bottom of stack.  If the top of stack
  55.     contains a larger number, that number is the number
  56.     of the last line in the displayed sequence.  Otherwise,
  57.     if it is a smaller number, it is used to specify the
  58.     total number of lines in the sequence.
  59.  
  60. LISTALL    lists the complete contents in the edit buffer.
  61.  
  62. NEWF    "Newfile" resets all pointers so that anything that
  63.     may have been in the editbuffer is lost.  Should be
  64.     used at the start of editing a new task.
  65.  
  66. OPENR    takes a string pointed to by the top of stack and
  67.     opens that named file for reading.  It is the user's
  68.     responsibility to make sure that the named file
  69.     exists already.  If another file was opened for reading
  70.     previously, it is closed by this new OPENR.
  71.  
  72. OPENW    takes a string pointed to by the top of stack and
  73.     opens that named file for writing.
  74.     (*** It will DESTROY any file that already exists
  75.     with that name!!!****)
  76.  
  77. READ    takes the number of lines specified by the top of
  78.     stack from the file specified by the last OPENR and
  79.     appends them to the end of text in the edit buffer.
  80.  
  81. REPLACE    Deletes the line specified by the top of stack and
  82.     begins INPUT at that same line.
  83.  
  84. WRITE    takes the number of lines specified by the top of
  85.     stack from the beginning of the text in the edit
  86.     buffer and places them at the end of the file
  87.     specified in the last OPENW.
  88.  
  89. :
  90. nters so that any